package com.vg.terrace.controller;

import com.vg.common.CommonResult;
import com.vg.terrace.vo.AdVO;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.springframework.web.bind.annotation.*;

import java.util.List;


//get 查 post 增 put 修 delete 删
@Api(tags = "用户管理")
@RestController
@RequestMapping("/user/management")
public class UserManagementController {
    @ApiOperation("查询所有用户")
    @GetMapping("/list")
    public CommonResult<List<AdVO>> list(){
        return CommonResult.success(null);
    }

    @ApiOperation("查询单个用户")
    @GetMapping("/get/{id}")
    public CommonResult<AdVO> get(@ApiParam("用户id") @PathVariable("id") Long id){
        return CommonResult.success(null);
    }

    @ApiOperation("新增用户")
    @PostMapping("/create")
    public CommonResult<AdVO> create(@RequestBody AdVO adVO){
        return CommonResult.success(null);
    }

    @ApiOperation("修改用户")
    @PutMapping("/update")
    public CommonResult<AdVO> update(@RequestBody AdVO adVO){
        return CommonResult.success(null);
    }
    @ApiOperation("删除用户")
    @DeleteMapping("/delete/{id}")
    public CommonResult delete(@ApiParam("用户id") @PathVariable("id") Long id){
        return CommonResult.success();
    }
}

